package org.sxp;

import org.apache.commons.lang.StringUtils;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.ImportResource;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;


@EnableTransactionManagement
@Import(StringUtils.class)
@ServletComponentScan
@MapperScan(basePackages = {"org.sxp.modules.*.dao","com.xxl.job.*.dao"})
@SpringBootApplication(
		scanBasePackages = {"org.sxp.common", "org.sxp.modules","com.xxl"},
		exclude = {SecurityAutoConfiguration.class, MongoAutoConfiguration.class})
@EnableCaching
@EnableScheduling
@ImportResource({
		"classpath:config/log/hsaf-log-aop.xml",
		"classpath:config/tx/hsaf-transactional-aop.xml",
		"classpath:config/exception/hsaf-exception-aop.xml",
		"classpath:config/validator/hsaf-validator-aop.xml",
		"classpath:config/validator/data-filter-aop.xml"
})
public class PPAdminApplication extends SpringBootServletInitializer {

	public static void main(String[] args) {
		SpringApplication.run(PPAdminApplication.class, args);
	}

}
